package util;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

import org.apache.hadoop.io.WritableComparable;

public class LongPair implements WritableComparable<LongPair> {
	public long first;
	public long second;

	public LongPair(int a, int b) {
		first = a;
		second = b;
	}

	public LongPair(long a, long b) {
		first = (int) a;
		second = (int) b;
	}

	public LongPair() {
		first = 0;
		second = 0;
	}

	@Override
	public void write(DataOutput out) throws IOException {
		out.writeLong(first);
		out.writeLong(second);
	}

	@Override
	public void readFields(DataInput in) throws IOException {
		first = in.readLong();
		second = in.readLong();
	}

	@Override
	public int compareTo(LongPair other) {
		return (first > (other).first) ? 0 : -1;
	}

}